home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1228_linking_and_cpu_usage.rtf < prev    next >
Text File  |  1995-06-12  |  2KB  |  35 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw11640
  3. \paperh8680
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  
  8. \fc1\cf1 When a link is in progress, it seems to take over my machine.  It's sluggish to activate another application and do any other work.  Is there a cure for this? \
  9. \
  10. A:  From a scheduling point of view, there's not much you can do to convince the kernel to give fewer resources to the linker. The linker is designed as the kernel's Dream Program by asking for certain size blocks with a certain regular pattern.\
  11. \
  12. However, the linker is I/O bound.  It's moving a lot of bits back and forth so anything you can do to make the travel time faster is a win:  faster hard disks, local access to files rather reading files all over NFS, etc.  Constructing the symbol table is a large resource hog; linking without symbols is much faster than with.  However, often you need the symbols for debugging while in development.  You can use the “-x” option to 
  13. \f1\b\fs24 ld(1)
  14. \f0\b0\fs28  to remove symbols from the sections of your code that you're not debugging currently, and then compile new sections with symbols so that only the parts you are working on have symbol information.  This is assuming you are concentrating your debugging efforts on only the changed parts. \
  15. \
  16. To do this, you need to do the following for each of your .o files:\
  17.  
  18. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f1\fs24\fc1\cf1     \
  19.     localhost> ld -r -x foo.o\
  20.     localhost> mv a.out foo.o\
  21. \
  22.  
  23. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc1\cf1 Then when you modify your sources, 
  24. \f1\b\fs24 make(1
  25. \b0 )
  26. \f0\fs28  just recompiles the object file with full symbols if you have the “-g ”flag on.\
  27. \
  28. NeXT's software engineers use systems with the smallest supported memory configurations to ensure they are developing software that is usable on the base configuration.  We have implemented compile servers to minimize the impact of large compiles on these local machines.  The compile servers maintain the sources locally and all compiles take place there.\
  29. \
  30. QA737\
  31. \
  32. Valid for 1.0, 2.0, 3.0\
  33. \
  34.  
  35.